<html>
<head>
    <title>跨域资源共享</title>
    <meta charset="UTF-8">
    <script type="text/javascript" src="http://localhost:8080/springboot/jquery-1.11.1.js" ></script>
</head>
<body>

    <button>发送ajax请求</button>

    <script type="text/javascript">

        $("button").click(function () {
            //发送ajax请求
            $.post("http://localhost:8080/springboot/file/todownload")
        })
    </script>
</body>
</html>
